<?php

namespace Admin\Controller;
use Think\Controller;


class LoginController extends Controller {
    public function index(){
        $this->display();
    }
    
    public function login(){
           if (IS_POST){
               $User =D('User');
               $mid =$User->login(I('post.username'),I('post.password'));
               echo $mid;
           }else {
               $this->error('非法访问！');
           }

    }
    
    
    
    
    public function logout(){
        session(null);
        $this->success('退出成功！',U('Login/index'));
        
    }

}